//package proc3;

public class TestGoods{
    public static void main(String[] args){
        Goods[] arr=new Goods[3];
        
        //创建商品对象：
        Goods g1=new Goods("001","荣耀90",2000.0,80);
        Goods g2=new Goods("004","书包",50.0,100);
        Goods g3=new Goods("007","手表",300.0,50);
        //商品放入数组中
        arr[0]=g1;
        arr[1]=g2;
        arr[2]=g3;
        
        
        for(int i=0;i<arr.length;i++){
            // Goods goods=arr[i];
            System.out.println(arr[i].getId()+","+arr[i].getName()+","+arr[i].getPrice()+","+arr[i].getInventory());
        }
    }
}